// 对外暴露插件对象
import SvgIcon from './SvgIcon/index.vue';
import Pagination from './Pagination/index.vue';

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const  allGloabComponent: Record<any, any> = {SvgIcon,Pagination};
export default {
  // 必须叫install 方法
  install(app:any){
    Object.keys(allGloabComponent).forEach(key  =>{
      app.component(key, allGloabComponent[key]);

      // 将element-plus/icons-vue 注册为全局组件
      for (const [key, component] of Object.entries(ElementPlusIconsVue) ){
        app.component(key, component);
      }
    })
  }
}